package com.mxpio.erp.common.vo;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpioframework.jpa.annotation.DictAble;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Transient;

@Data
public class InvFlowSummaryVo implements DictAble {

	@Schema(description = "物料代码")
	private String itemCode;
	
	@Schema(description = "物料名称")
	private String itemName;
	
	@Schema(description = "物料规格")
	private String itemSpec;
	
	@Schema(description = "数量")
	private BigDecimal quantity;
	
	@Schema(description = "批次号")
	private String lotNo;

	@Schema(description = "子批次索引号")
	private String subLotIndex;


	@Schema(description = "图号")
	private String drawingNo;

	@Schema(description = "仓库编号")
	@Dict(dicCode = "whCode", dicEntity = Warehouse.class, dicText = "whName")
	private String whCode;

	@Schema(description = "单位编号")
	@Dict(dicCode="ERP_TECH_UNIT_CODE")
	private String unitCode;

	@Transient
	private Map<String, String> textMap;

	public String putText(String key, String value) {
		if (textMap == null) {
			textMap = new HashMap<>();
		}
		return textMap.put(key, value);
	}
}
